<template>
	<div class="itemMonitor">
		<!-- <div class="breadcrumb">
      <el-breadcrumb separator-class="el-icon-arrow-right">
        <template v-for="item in breadcrumbList">
          <el-breadcrumb-item :key="item">{{ item }}</el-breadcrumb-item>
        </template>
      </el-breadcrumb>
    </div> -->
		<router-view></router-view>
	</div>
</template>

<script>
	let breadcrumb = []
	export default {
		beforeRouteEnter(to, from, next) {
			breadcrumb = to.matched.map((_) => {
				return _.meta.title;
			});
			breadcrumb.unshift('IT智慧运维平台')
			next()
		},
		beforeRouteUpdate(to, from, next) {
			this.breadcrumbList = to.matched.map((_) => {
				return _.meta.title;
			});
			this.breadcrumbList.unshift('IT智慧运维平台')
			next();
		},
		data() {
			return {
				breadcrumbList: breadcrumb,
			};
		},
	};
</script>

<style scope>
	.itemMonitor .breadcrumb {
		height: 30px;
		display: grid;
		align-items: center;
		padding-left: 10px;
	}
</style>